﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Play
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            IDK.MemoryManager.Init();
            Game.Log.Init("Logs", "0");
            Game.Log.Warn("Log override mode");
            try
            {
                Game.GameApplication game = new Game.GameApplication();
                game.Run();
            }
            catch (Exception e)
            {
                Game.Log.Error(e);
                Game.Log.ShowLogFile();
                return; //dont show mem leaks, becasue it's abonormaly situation
            }

            GC.Collect();
            GC.WaitForPendingFinalizers();

            IDK.MemoryManager.ShowLeaks();
        }
    }
}
